import request from '@/utils/request';
import downloader from '@/utils/downloader';
//列表
export function deviceList(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/device/list',
    method: 'get',
    params: data,
  });
}
export function deviceSave(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/device/add',
    method: 'post',
     data,
  });
}

//修改设备
export function deviceUpdate(data) {
  return request({
    url: '/admin/device/update',
    method: 'POST',
    data,
  });
}
//删除设备
export function deviceRemove(data) {
  return request({
    url: '/admin/device/delete',
    method: 'DELETE',
    params: data,
  });
}

//设备状态修改
export function disabledActive(data) {
  return request({
    url: '/admin/device/disabled',
    method: 'POST',
    data,
  });
}
export function downloadTemplate(data) {
  return downloader({

    url: '/admin/device/download',
      method: 'get',
      headers: {
  
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求内容类型，根据实际需求修改
    },
    params: data,
      });
}



//批量导入设备
export function importClass(data) {
  return request({
    url: '/admin/device/importDevice',
    method: 'POST',
    data,
  });
}